@echo off
echo Kompiluji zdrojove kody...
@mkdir out_m2j
@mkdir build
@cd out_m2j
@javac -d ./ -cp ..\src ..\src\implementation1\app\commands\*.java
@javac -d ./ -cp ..\src ..\src\*.java
@xcopy /q /e /y "..\src\implementation1\res" "implementation1\res\"

echo Vytvarim manifest pro JAR...
@mkdir META-INF
@echo Main-Class: Main>META-INF\MANIFEST.MF

echo Vytvarim JAR...
@jar cfm ..\build\m2jos.jar META-INF\MANIFEST.MF com exceptions implementation1 interfaces *.class
cd ..
echo Mazu docasne soubory...
@rd /S /Q out_m2j

echo Hotovo!